{template '_header'}
{if !empty($taskinfo)}
<script>document.title = "{$taskinfo['title']}"; </script>
<link rel="stylesheet" href="../addons/ewei_shopv2/plugin/task/static/style/common.css" />

<div class='fui-page  fui-page-current task-detail-page'>

    <div class="fui-content">
        <div class="detail-head">
            <img src="../addons/ewei_shopv2/plugin/task/static/images/detail-head.jpg" />
            <div class="signal-detail-main">
                <div class="detail-sub red">已完成</div>
                <div class="signal-detail-title"><i class="icon icon-form"></i> {$taskinfo['title']}</div>
                <div class="signal-detail-text">累计邀请{$taskinfo['needcount']}人扫描或关注海报</div>
            </div>
        </div>

        <div class="detail-list-title"><i class="icon icon-recharge"></i> 任务奖励</div>
        <div class="detail-list signal">
            {php $count=1;}
            {if $taskinfo['reward_data']['credit']>0}
            <div class="list-item">
                <div class="inner">
                    <div class="reward-info"><i class="icon icon-jifen"></i> 积分奖励 <span class="big">{$taskinfo['reward_data']['credit']} <small>(积分)</small></span></div>
                    <div class="reward-btn disabled">已领取</div>
                </div>
                <div class="status orange">
                    <div class="text">
                        <p>奖</p>
                        <p>励</p>
                        <p>{$count}</p>
                    </div>
                </div>
            </div>
            {php $count++;}
            {/if}
            {if $taskinfo['reward_data']['money']['num']>0}
            <div class="list-item">
                <div class="inner">
                    <div class="reward-info"><i class="icon icon-recharge"></i> 金钱奖励 <span class="big">{$taskinfo['reward_data']['money']['num']} <small>(元)</small></span></div>
                    <div class="reward-btn disabled">已领取</div>
                </div>
                <div class="status orange">
                    <div class="text">
                        <p>奖</p>
                        <p>励</p>
                        <p>{$count}</p>
                    </div>
                </div>
            </div>
            {php $count++;}
            {/if}

            {if $taskinfo['reward_data']['bribery']>0}
            <div class="list-item">
                <div class="inner">
                    <div class="reward-info"><i class="icon icon-pay"></i> 红包奖励 <span class="big">{$taskinfo['reward_data']['bribery']} <small>(元)</small></span></div>
                    <div class="reward-btn disabled">已领取</div>
                </div>
                <div class="status orange">
                    <div class="text">
                        <p>奖</p>
                        <p>励</p>
                        <p>{$count}</p>
                    </div>
                </div>
            </div>
            {php $count++;}
            {/if}

            {if $taskinfo['reward_data']['coupon']['total']>0}
            <div class="list-item">
                <div class="inner">
                    <div class="reward-info"><i class="icon icon-goods"></i> 优惠券奖励 <span class="big">{$taskinfo['reward_data']['coupon']['total']}张优惠券</span></div>
                    <div class="reward-btn disabled">已领取</div>
                </div>
                <div class="status orange">
                    <div class="text">
                        <p>奖</p>
                        <p>励</p>
                        <p>{$count}</p>
                    </div>
                </div>
            </div>
            {php $count++;}
            {/if}

            {if count($taskinfo['reward_data']['goods'])>0}
            <div class="list-item">
                <div class="inner">
                    <div class="reward-info"><i class="icon icon-goods"></i> 特价商品奖励 <span class="big">{php echo count($taskinfo['reward_data']['goods']);}个特价商品</span></div>
                    <a href="{php echo mobileUrl('task/goodslist',array('id'=>$taskinfo['join_id']),true);}"><div class="reward-btn ">领 取</div></a>
                </div>
                <div class="status orange">
                    <div class="text">
                        <p>奖</p>
                        <p>励</p>
                        <p>{$count}</p>
                    </div>
                </div>
            </div>
            {php $count++;}
            {/if}
        </div>
        <div class="detail-list-title"><i class="icon icon-information"></i> {$res['taskinfotitle']}</div>

        <div class="detail-text">{if !empty($res['taskinfo'])}{php $taskinfo = unserialize($res['taskinfo']); echo htmlspecialchars_decode($taskinfo);}{else}暂无说明{/if}</div>

    </div>

</div>
{else}
<script>document.title = '未查到此任务信息'; </script>
<div class='fui-page  fui-page-current'>
    <div class="fui-content ">
        <h3 class="text-center">未查到任务信息</h3>
    </div>
</div>
{/if}

{template '_footer'}